<%@ page language="java" pageEncoding="UTF-8"%>
<%@include file="/global/global-head.jsp" %>
<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>吉车惠后台管理系统</title>
	<%@include file="/global/global-other.jsp" %>
<script type="text/javascript">
	var $bn_oilStaion_map_up = new Object();
	var $bn_oilStaion_map_Datagrid_up;
	var viewDialog_map_up = null;
	$(function(){
		$("#lng").click(function(){
			openmap();
		});
		$("#lat").click(function(){
			openmap();
		});
	});
	$(function() {
		parent.$.messager.progress('close');
		submitForm = function( $dialog, $gird){
			$('#an_car_form').form('submit',{
				url:'${ctx}/bn/oil/update',
				queryParams:{_m:'exec'},
				onSubmit:function(){
					if($(this).form('enableValidation').form('validate')){
						return true;
					}else{
						return false;
					}
				},
				success:function(data){
					var json =  eval("(" +data+ ")");
					if(statusMsg(json)){
						parent.$.messager.alert("提示","保存成功！","info",function(){
							$dialog.dialog('destroy');
							$gird.datagrid('reload');
						});
					}
				}
			});
		};

	});
	function openmap(){
		var lng = $("#lng").val();
		var lat = $("#lat").val();
		viewDialog_map_up=parent.$.dialog({
			title: '查看地图',
			href: '${ctx}/bn/oil/show?_m=showMap&lng='+lng+'&lat='+lat+'&r='+Math.random(),
			width: 1000,
			height: 600,
			//bodyStyle: {overflow: 'auto'},
			buttons: [{
				text: '保 存',
				width:'70px',
				iconCls: 'icon-ok',
				handler: function(){
					viewDialog_map_up.find('iframe').get(0).contentWindow.submitForm(viewDialog_map_up,$bn_oilStaion_map_up);
				}
			},{
				text: '关 闭',
				width:'70px',
				iconCls: 'icon-close',
				handler: function(){
					viewDialog_map_up.close();
				}
			}]
		});
		parent.$.messager.progress('close');
	}
	$bn_oilStaion_map_up.setjwd = function(lngX,latY){
		$("#lng").val(lngX);
		$("#lat").val(latY);
	}
</script>
	</head>
<body>
<div class="form-box">
	<div class="form-body">
		<form role="form" name="an_car_form" id="an_car_form" class="easyui-form form form-horizontal" data-options="novalidate:true" method="post">

			<div class="seg-title">
				<div class="seg-title-box">
					<ul>
						<li class="seg-title-box-icon" ><img src="${ctx }/assets/images/communication.gif"/></li>
						<li class="seg-title-box-text">基本信息</li>
						<input type="hidden" id="oilStationId" name="oilStationId" value="${bnOilStationEntity.oilStationId}"  >
					</ul>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">
					<p class="label-txt">城市：</p>
					<p class="star">*</p>
				</label>
				<div class="col-sm-3">
					<input type="text"  id="cityCode" name="cityCode" value="${bnOilStationEntity.cityCode}"  class="form-control easyui-combobox" style="width:100%;height:34px;line-height:34px;" data-options="valueField: 'code',textField: 'name',url:'${ctx}/tcode/all/method?method=getCacheCdCity',editable:false" required="required"></input>
				</div>
				<label class="col-sm-2 control-label">
					<p class="label-txt">区/县：</p>
					<p class="star">*</p>
				</label>
				<div class="col-sm-3">
					<input type="text"  id="countyCode" name="countyCode" value="${bnOilStationEntity.countyCode}" class="form-control easyui-combobox" style="width:100%;height:34px;line-height:34px;" data-options="valueField: 'code',textField: 'name',url:'${ctx}/tcode/all/method?method=getCacheCdCounty',editable:false" required="required"></input>
					<%--<select type="text" id="countyCode" name="countyCode" value="" class="form-control easyui-combobox" style="width:100%;height:34px;line-height:34px;"  required="required" data-options="editable:false,valueField:'id', textField:'text'"></select>--%>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">
					<p class="label-txt">石油公司：</p>
					<p class="star">*</p>
				</label>
				<div class="col-sm-3">
					<input type="text"  id="oilCompanyCode" name="oilCompanyCode" value="${bnOilStationEntity.oilCompanyCode}" class="form-control easyui-combobox" style="width:100%;height:34px;line-height:34px;" data-options="valueField: 'code',textField: 'name',url:'${ctx}/tcode/all/method?method=getCacheCdOilCompanies',editable:false" required="required"></input>
				</div>
				<label class="col-sm-2 control-label">
					<p class="label-txt">加油站全称：</p>
					<p class="star">*</p>
				</label>
				<div class="col-sm-3">
					<input type="text" id="oilStationName" name="oilStationName" value="${bnOilStationEntity.oilStationName}" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,50]">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">
					<p class="label-txt">加油站简称：</p>
					<p class="star">*</p>
				</label>
				<div class="col-sm-3">
					<input type="text" id="oilStationShortName" name="oilStationShortName" value="${bnOilStationEntity.oilStationShortName}"  class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,50]">
				</div>
				<label class="col-sm-2 control-label">
					<p class="label-txt">关键字：</p>
					<p class="star">*</p>
				</label>
				<div class="col-sm-3">
					<input type="text" id="keyword" value="${bnOilStationEntity.keyword}" name="keyword" class="form-control easyui-combobox" style="width:100%;height:34px;line-height:34px;" required="required" data-options="
                    valueField: 'label',
                    textField: 'value',
                    data: [{
                        label: 'A',
                        value: 'A'
                    },{
                        label: 'B',
                        value: 'B'
                    },{
                        label: 'C',
                        value: 'C'
                    },{
                        label: 'D',
                        value: 'D'
                    },{
                        label: 'E',
                        value: 'E'
                    },{
                        label: 'F',
                        value: 'F'
                    },{
                        label: 'G',
                        value: 'G'
                    },{
                        label: 'H',
                        value: 'H'
                    },{
                        label: 'I',
                        value: 'I'
                    },{
                        label: 'J',
                        value: 'J'
                    },{
                        label: 'K',
                        value: 'K'
                    },{
                        label: 'L',
                        value: 'L'
                    },{
                        label: 'M',
                        value: 'M'
                    },{
                        label: 'N',
                        value: 'N'
                    },{
                        label: 'O',
                        value: 'O'
                    },{
                        label: 'P',
                        value: 'P'
                    },{
                        label: 'Q',
                        value: 'Q'
                    },{
                        label: 'R',
                        value: 'R'
                    },{
                        label: 'S',
                        value: 'S'
                    },{
                        label: 'T',
                        value: 'T'
                    },{
                        label: 'U',
                        value: 'U'
                    },{
                        label: 'V',
                        value: 'V'
                    },{
                        label: 'W',
                        value: 'W'
                    },{
                        label: 'X',
                        value: 'X'
                    },{
                        label: 'Y',
                        value: 'Y'
                    },{
                        label: 'Z',
                        value: 'Z'
                    }
                    ],editable:false" />
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">
					<p class="label-txt">纬度：</p>
					<p class="star">*</p>
				</label>
				<div class="col-sm-3">
					<input type="text" id="lat" name="lat" value="${bnOilStationEntity.lat}" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,10]">
				</div>
				<label class="col-sm-2 control-label">
					<p class="label-txt">经度：</p>
					<p class="star">*</p>
				</label>
				<div class="col-sm-3">
					<input type="text" id="lng" name="lng"  value="${bnOilStationEntity.lng}" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,10]">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">
					<p class="label-txt">地址：</p>
					<p class="star">*</p>
				</label>
				<div class="col-sm-3">
					<input type="text" id="address" name="address" value="${bnOilStationEntity.address}"  class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,50]">
				</div>
				<label class="col-sm-2 control-label">
					<p class="label-txt">erpCode：</p>
					<p class="star">*</p>
				</label>
				<div class="col-sm-3">
					<input type="text" id="erpCode" name="erpCode" value="${bnOilStationEntity.erpCode}" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,20]">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">
					<p class="label-txt">hosCode：</p>
					<p class="star">*</p>
				</label>
				<div class="col-sm-3">
					<input type="text" id="hosCode" name="hosCode" value="${bnOilStationEntity.hosCode}" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,20]">
				</div>
			</div>
		</form>
	</div>
</div>
</body>
</html>